home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / program / pwrbat23.zip / PBINSTAL.PWR < prev    next >
Text File  |  1996-05-09  |  10KB  |  363 lines

  1. ;VARIABLES
  2.     Variable    Work1,80
  3.     Variable    Msg,80
  4.     Variable    Work2,1
  5.     Variable    CurrColor,3
  6.     Variable    MonitorType,1
  7.     Variable    BorderClr,3,4
  8.     Variable    BlkOnRed,3,'064'
  9.     Variable    BlkOnGray,3,112
  10.     Variable    BluOnGray,3,113
  11.     Variable    RedOnGray,3,116
  12.     Variable    TitleClr,4
  13.     Variable    ErrClr,4
  14.     Variable    Bell,1,#7
  15.     Variable    Normal,1,1
  16.   Variable  Off,1,0
  17.   Variable  Spaces,40,'                                        '
  18.  
  19.     Variable    SourceDrive,1
  20.   Variable  SourceDir,80,'\'
  21.     Variable    RTN,1,#013
  22.     Variable    ESC,1,#027
  23.     Variable    VolID,12
  24.     Variable    DriveType,12
  25.   Variable  StrLoc,2
  26.   Variable  FlopInst,1,1
  27.     Variable    ErrorMsg,78
  28.     Variable    TargetDrive,1
  29.     Variable    TargetDir,80
  30.     Variable    DemoDrive,1
  31.     Variable    DemoDir,80
  32.     Variable    InfoMsg,76
  33.     Variable    CreateFlag,1,0
  34.  
  35. ;HOUSEKEEPING
  36.     ?Color        Work1,Work1,CurrColor
  37.     SetVar        MonitorType,DispAdapter
  38.     Compare     MonitorType,'C',,,ColorMon
  39.     SetVar        BorderClr,'000'
  40.     SetVar        BlkOnRed,'007'
  41.     SetVar        BlkOnGray,BlkOnRed
  42.     SetVar        BluOnGray,BlkOnRed
  43.     SetVar        RedOnGray,BlkOnRed
  44.  
  45. Label    ColorMon
  46.     Concat      ErrClr,'',BlkOnRed
  47.     Concat        TitleClr,'',BlkOnGray
  48.  
  49. ;MAIN ROUTINE
  50.     Clear        BluOnGray,,'░',BorderClr
  51.     Concat        Work1,TitleClr,' Press Escape To Exit Installation '
  52.     Center        Work1,25
  53.     Box2        6,2,75,4,RedOnGray
  54.   Concat    Work1,TitleClr,'PowerBatch Installation'
  55.     Center        Work1,3
  56.     SaveBox     2,6,78,8
  57.     Box1        2,6,78,8,BlkOnGray
  58.  
  59. Label   FindSource
  60.   WriteAt   3,7,'Look For Install Disk...'
  61.   SetVar    SourceDrive,'A'
  62.   ?DiskInfo SourceDrive,VolID,DriveType
  63.   Compare   VolID,'PBINSTAL',,,FoundID
  64.   SetVar    SourceDrive,'B'
  65.   ?DiskInfo SourceDrive,VolID,DriveType
  66.   Compare   VolID,'PBINSTAL',,,FoundID
  67.   SetVar    SourceDrive,'?'
  68. Label   FoundID
  69.     WriteAt     3,7,'Drive Letter Which Contains Install Disk '
  70.   Write   SourceDrive,RedOnGray
  71.     GoToXY        44,7
  72.     FlushKey
  73.   ReadUpKey Work1
  74.     GoToXy        44,7
  75.   Write     Work1,RedOnGray
  76.   Compare   Work1,Esc,,,EndPgm
  77.   Compare   Work1,RTN,,,SrcDrEntered
  78.   SetVar    SourceDrive,Work1
  79.  
  80. Label   SrcDrEntered
  81.     ?DiskInfo    SourceDrive,VolID,DriveType
  82.   LocStr    'Floppy',DriveType,1,StrLoc
  83.   Compare   StrLoc,0,FromFlop
  84.   SetVar    FlopInst,0
  85.   ?CurrDir  SourceDrive,SourceDir
  86.   ClearBox  2,6,78,8,BlkOnGray
  87.   WriteAt   3,7,'Source Dir '
  88.   Write     SourceDir,RedOnGray
  89.   GoToXY    14,7
  90.   FlushKey
  91.   ReadUpKey Work1
  92.   Compare   Work1,Esc,,,EndPgm
  93.   Compare   Work1,RTN,,,FoundDisk
  94.   Compare   Work1,'\',,,NoSlash
  95.   Concat    Work1,'\',Work1
  96. Label     NoSlash
  97.   WriteAt   14,7,Spaces
  98.   WriteAt   14,7,Work1
  99.   ReadStr   SourceDir
  100.   Concat    SourceDir,Work1,SourceDir
  101.   Upper     SourceDir
  102.   WriteAt   14,7,SourceDir
  103.   Concat    Work1,SourceDrive,':',SourceDir,'\POWERMAK.EXE'
  104.   ?FileExist Work1,FoundDisk
  105.   SetVar    ErrorMsg,'This directory does not contain the source for PowerBatch'
  106.   Perform   ErrorRtn
  107.   GoTo      FindSource
  108. Label   FromFlop
  109.   Compare   VolID,'PBINSTAL',,,FoundDisk
  110.     SetVar        ErrorMsg,'This disk is not the install disk...'
  111.     Perform     ErrorRtn
  112.     GoTo        FindSource
  113.  
  114. Label   FoundDisk
  115.     ClearBox    2,6,78,8,BlkOnGray
  116.     WriteAt     3,7,'Drive Letter Where You Will Install PB Plus+ '
  117.     Write        'C:',RedOnGray
  118.     GoToXY        48,7
  119.     FlushKey
  120.     ReadUpKey    TargetDrive
  121.     Compare     TargetDrive,Esc,,,EndPgm
  122.     Compare     TargetDrive,RTN,TrgDrEntered,TrgDrEntered
  123.     SetVar        TargetDrive,'C'
  124.  
  125. Label   TrgDrEntered
  126.     ?DriveExist TargetDrive,SrcDrOK
  127.     SetVar        ErrorMsg,'Specified drive does not exist...'
  128.     Perform     ErrorRtn
  129.     GoTo        FoundDisk
  130.  
  131. Label    SrcDrOK
  132.     ClearBox    2,6,78,8,BlkOnGray
  133.     WriteAt     3,7,'Target Directory: '
  134.     SaveBox     2,10,78,15
  135.     Box1        2,10,78,15,BlkOnGray
  136.     WriteAt     3,11,'In order to compile PB Plus+ programs from any directory on your system,'
  137.     WriteAt     3,12,'the compiler must be in a directory located on the DOS search path.'
  138.     WriteAt     3,13,'If you wish to compile from only the directory containing the compiler'
  139.     WriteAt     3,14,'it will not be necessary to have the compiler on the DOS search path.'
  140.     GoToXY        21,7
  141.     FlushKey
  142.     ReadStr     TargetDir
  143.     Upper        TargetDir
  144.     SetVar        Work2,TargetDir
  145.     Compare     Work2,'\',,,TrgtDirOK
  146.     Concat        TargetDir,'\',TargetDir
  147.  
  148. Label    TrgtDirOK
  149.     Concat        TargetDir,TargetDrive,':',TargetDir
  150.     SetVar        Work1,TargetDir
  151.     Perform     ChkDir
  152.     Compare     CreateFlag,0,SrcDrOk
  153.     ?InPath     TargetDir,PathOK
  154.     SetVar        InfoMsg,'Selected directory not in path...'
  155.     Perform     MsgRtn
  156.     Wait        30
  157.     RestBox
  158.  
  159. Label    PathOK
  160.     ClearBox    2,6,78,8,BlkOnGray
  161.     WriteAt     3,7,'Drive Letter Where You Will Install PB Plus+ Demos Programs '
  162.     WriteAt     63,7,TargetDrive
  163.     Write        ':'
  164.     GoToXY        63,7
  165.     FlushKey
  166.     ReadUpKey    DemoDrive
  167.     Compare     DemoDrive,Esc,,,EndPgm
  168.     Compare     DemoDrive,RTN,DemoDrEntered,DemoDrEntered
  169.     SetVar        DemoDrive,TargetDrive
  170.  
  171. Label    DemoDrEntered
  172.     ?DriveExist DemoDrive,DemoDrOK
  173.     SetVar        ErrorMsg,'Specified drive does not exist...'
  174.     Perform     ErrorRtn
  175.     GoTo        PathOK
  176.  
  177. Label    DemoDrOK
  178.     ClearBox    2,6,78,8,BlkOnGray
  179.     WriteAt     3,7,'Demo Directory: '
  180.     GoToXY        19,7
  181.     FlushKey
  182.     ReadStr     DemoDir
  183.     Upper        DemoDir
  184.     SetVar        Work2,DemoDir
  185.     Compare     Work2,'\',,,DemoDirOK
  186.     Concat        DemoDir,'\',DemoDir
  187.  
  188. Label    DemoDirOK
  189.     Concat        DemoDir,DemoDrive,':',DemoDir
  190.     SetVar        Work1,DemoDir
  191.     Perform     ChkDir
  192.     Compare     CreateFlag,0,DemoDrOK
  193.     Box1        2,6,78,15,BluOnGray
  194.     WriteAt     3,7,'Source Drive For PB Plus+ '
  195.     Write        SourceDrive,RedOnGray
  196.     Write        ':',RedOnGray
  197.   Write   SourceDir,RedOnGray
  198.     WriteAt     3,9,'Target Directory: '
  199.     Write        TargetDir,RedOnGray
  200.     WriteAt     3,11,'Demo Directory : '
  201.     Write        DemoDir,RedOnGray
  202.     GoToXy        5,13
  203.     FlushKey
  204.     ReadYN        'Enter Y if correct...Else enter N (Y/N)',Work2
  205.     Compare     Work2,'N',,,ColorMon
  206.  
  207. ;INSTALL SOFTWARE
  208.   Length    Work1,SourceDir
  209.   MidString Work1,SourceDir,Work1,1
  210.   Compare   Work1,'\',,,SrcDirOK
  211.   Concat    SourceDir,'\'
  212. Label   SrcDirOK
  213.   Concat    Work1,TitleClr,'          Install Software         '
  214.   Center    Work1,25
  215.   Cursor    Off
  216.   Box4      2,17,78,19,RedOnGray,,7
  217.   Concat    Work1,SourceDrive,':',SourceDir,'POWERMAK.EXE'
  218.   Concat    Msg,'Copy ',Work1,' to ',TargetDir,'          '
  219.   MidString Msg,Msg,1,70
  220.   WriteAt   3,18,Msg,RedOnGray
  221.   COPY      Work1,TargetDir,' >NUL'
  222.   Concat    Work1,SourceDrive,':',SourceDir,'SMLMODEL.MDL'
  223.   Concat    Msg,'Copy ',Work1,' to ',TargetDir,'          '
  224.   MidString Msg,Msg,1,70
  225.   WriteAt   3,18,Msg,RedOnGray
  226.   COPY      Work1,TargetDir,' >NUL'
  227.   Concat    Work1,SourceDrive,':',SourceDir,'ARRAYS.EXE'
  228.   Concat    Msg,'Copy ',Work1,' to ',TargetDir,'          '
  229.   MidString Msg,Msg,1,70
  230.   WriteAt   3,18,Msg,RedOnGray
  231.   COPY      Work1,TargetDir,' >NUL'
  232.   Cursor    Off
  233.   Concat    Work1,SourceDrive,':',SourceDir,'COLORS.EXE'
  234.   Concat    Msg,'Copy ',Work1,' to ',TargetDir,'          '
  235.   MidString Msg,Msg,1,70
  236.   WriteAt   3,18,Msg,RedOnGray
  237.   COPY      Work1,TargetDir,' >NUL'
  238.   Cursor    Off
  239.   Concat    Work1,SourceDrive,':',SourceDir,'KEYID.EXE'
  240.   Concat    Msg,'Copy ',Work1,' to ',TargetDir,'          '
  241.   MidString Msg,Msg,1,70
  242.   WriteAt   3,18,Msg,RedOnGray
  243.   COPY      Work1,TargetDir,' >NUL'
  244.   Cursor    Off
  245.   Concat    Work1,SourceDrive,':',SourceDir,'MENUDEMO.EXE'
  246.   Concat    Msg,'Copy ',Work1,' to ',TargetDir,'          '
  247.   MidString Msg,Msg,1,70
  248.   WriteAt   3,18,Msg,RedOnGray
  249.   COPY      Work1,TargetDir,' >NUL'
  250.   Cursor    Off
  251.   Concat    Work1,SourceDrive,':',SourceDir,'PLUSDEMO.EXE'
  252.   Concat    Msg,'Copy ',Work1,' to ',TargetDir,'          '
  253.   MidString Msg,Msg,1,70
  254.   WriteAt   3,18,Msg,RedOnGray
  255.   COPY      Work1,TargetDir,' >NUL'
  256.   Cursor    Off
  257.   Concat    Work1,SourceDrive,':',SourceDir,'README.1ST'
  258.   Concat    Msg,'Copy ',Work1,' to ',TargetDir,'          '
  259.   MidString Msg,Msg,1,70
  260.   WriteAt   3,18,Msg,RedOnGray
  261.   COPY      Work1,TargetDir,' >NUL'
  262.   Cursor    Off
  263.   Concat    Work1,SourceDrive,':',SourceDir,'FILE_ID.DIZ'
  264.   Concat    Msg,'Copy ',Work1,' to ',TargetDir,'          '
  265.   MidString Msg,Msg,1,70
  266.   WriteAt   3,18,Msg,RedOnGray
  267.   COPY      Work1,TargetDir,' >NUL'
  268.   Cursor    Off
  269.   Concat    Work1,SourceDrive,':',SourceDir,'PACKING.LST'
  270.   Concat    Msg,'Copy ',Work1,' to ',TargetDir,'          '
  271.   MidString Msg,Msg,1,70
  272.   WriteAt   3,18,Msg,RedOnGray